.ai-assistant {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
}

.ai-assistant-button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00ffff, #0080ff);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 255, 255, 0.4);
  transition: all 0.3s ease;
  position: relative;
}

.ai-assistant-button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 255, 255, 0.6);
}

.ai-assistant.open .ai-assistant-button {
  background: linear-gradient(135deg, #ff4757, #ff6b7a);
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4);
}

.ai-assistant.open .ai-assistant-button:hover {
  box-shadow: 0 6px 20px rgba(255, 71, 87, 0.6);
}

.assistant-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.assistant-icon {
  font-size: 28px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.assistant-status {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #4caf50;
  border: 2px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: white;
}

.assistant-status.active {
  background: #ff4757;
}

.ai-assistant-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 380px;
  height: 500px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.assistant-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.assistant-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #00ffff;
  font-weight: 600;
}

.config-warning {
  color: #ffc107;
  font-size: 14px;
  cursor: help;
}

.assistant-actions {
  display: flex;
  gap: 8px;
}

.config-btn,
.clear-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.config-btn:hover,
.clear-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.assistant-messages {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.welcome-message {
  text-align: center;
  padding: 20px 0;
  color: rgba(255, 255, 255, 0.8);
}

.assistant-avatar-large {
  font-size: 48px;
  margin-bottom: 15px;
}

.welcome-message h3 {
  margin: 0 0 10px 0;
  color: white;
  font-size: 1.3rem;
}

.welcome-message p {
  margin: 0 0 20px 0;
  line-height: 1.5;
}

.suggested-questions h4 {
  margin: 0 0 10px 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
}

.question-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.question-btn {
  background: rgba(0, 255, 255, 0.1);
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 20px;
  padding: 8px 15px;
  color: #00ffff;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  text-align: left;
}

.question-btn:hover {
  background: rgba(0, 255, 255, 0.2);
  transform: translateX(5px);
}

.message {
  display: flex;
  gap: 10px;
  max-width: 85%;
}

.message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message.assistant {
  align-self: flex-start;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.message.user .message-avatar {
  background: linear-gradient(135deg, #00ffff, #0080ff);
}

.message-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.message-text {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 10px 15px;
  color: white;
  line-height: 1.4;
  word-wrap: break-word;
  position: relative;
}

.message.user .message-text {
  background: linear-gradient(135deg, #00ffff, #0080ff);
  border-bottom-right-radius: 5px;
}

.message.assistant .message-text {
  background: rgba(255, 255, 255, 0.1);
  border-bottom-left-radius: 5px;
}

.error-indicator {
  margin-left: 8px;
  color: #ff4757;
}

.message-time {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  align-self: flex-end;
}

.message.user .message-time {
  align-self: flex-start;
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 10px 15px;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typing {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.assistant-input {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 15px;
  background: rgba(0, 0, 0, 0.2);
}

.input-container {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.input-container input {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 8px 15px;
  color: white;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.input-container input:focus {
  border-color: #00ffff;
}

.input-container input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #00ffff, #0080ff);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.3s ease;
}

.send-btn:hover:not(:disabled) {
  transform: scale(1.05);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.quick-actions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 5px;
}

.quick-actions button {
  background: rgba(0, 255, 255, 0.1);
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 15px;
  padding: 5px 10px;
  color: #00ffff;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.quick-actions button:hover {
  background: rgba(0, 255, 255, 0.2);
}

/* Scrollbar styling */
.assistant-messages::-webkit-scrollbar {
  width: 6px;
}

.assistant-messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.assistant-messages::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 255, 0.3);
  border-radius: 3px;
}

.assistant-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 255, 0.5);
}

/* Responsive Design */
@media (max-width: 480px) {
  .ai-assistant-window {
    width: calc(100vw - 40px);
    right: -10px;
    height: 450px;
  }
  
  .quick-actions {
    flex-wrap: wrap;
  }
  
  .quick-actions button {
    flex: 1;
    min-width: calc(33% - 6px);
  }
}